<template>
	<view class="collect">
		<view class="collect-item" v-for="(item,index) in collectList" :key='index'>
			<view class="image">
				<u-image width='160rpx' mode='widthFix' :src="item.goods.cover_url"></u-image>
			</view>
			
			<view class="right">
				<view class="title">
					{{item.goods.title}}
				</view>
				<view class="dec">
					{{item.goods.description}}
				</view>
				<view class="price">
					￥{{item.goods.price}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {collectList} from '../../common/http.api.js'
	export default{
		data(){
			return{
				collectList:[],
				page:1,
			}
		},
		async onLoad() {
			const res=await this.$u.api.collectList({
				page:this.page
			});
			console.log(res)
			this.collectList=res.data.data;
		}
	}
</script>

<style lang="scss" scoped>
	.collect-item{
		display: flex;
		margin: 20rpx;
		border-bottom:2rpx solid #F8F8F8 ;
		background-color: #C8C7CC;
		border-radius: 10rpx;
		.image{
			padding: 20rpx;
		}
		.right{
			padding: 20rpx 0;
		}
		.title{
			font-size: 30rpx;
			font-weight: bold;
		}
		.dec{
			font-size: 24rpx;
			margin:10rpx 0 20rpx 0
		}
		.price{
			color: red;
			font-size: 30rpx;
			font-weight: bold;
		}
	}
</style>
